Implementing exact real arithmetic in python, C++ and C

نویسنده

  • Keith Briggs
چکیده

I discuss the design and performance issues arising in the efficient implementation of the scaled-integer exact real arithmetic model introduced by Boehm and others. This system represents an real number with a automatically controlled level of precision by a rational with implicit denominator. I describe three practical codes, in python, C++ and C. These allow the convenient use of this computational paradigm in commonly-used imperative languages.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Reliable Integration of Exact and Approximated Arithmetic with Three-Valued Logic in Python⋆

The error-ranges of exact rational numbers and intervals can be guaranteed even during the arithmetic operations whereas we cannot rely on the error-ranges of floating-point numbers. In this paper, we propose a novel number system, where the exact rational numbers are strictly separated from inexact floating point numbers and carefully integrated with the inexact numbers. A three-valued logic i...

متن کامل

Exact real arithmetic using centred intervals and bounded error terms

Approximations based on dyadic centred intervals are investigated as a means for implementing exact real arithmetic. It is shown that the field operations can be implemented on these approximations with optimal or near optimal results. Bounds for the loss in quality of approximations for each of the field operations are also given. These approximations can be used as a more efficient alternativ...

متن کامل

The iRRAM: Exact Arithmetic in C++

Abstract: The iRRAM is a very efficient C++ package for errorfree real arithmetic based on the concept of a Real-RAM. Its capabilities range from ordinary arithmetic over trigonometric functions to linear algebra even with sparse matrices. We discuss the concepts and some highlights of the implementation.

متن کامل

On rainbow 4-term arithmetic progressions

{sl Let $[n]={1,dots, n}$ be colored in $k$ colors. A rainbow AP$(k)$ in $[n]$ is a $k$ term arithmetic progression whose elements have different colors. Conlon, Jungi'{c} and Radoiv{c}i'{c} cite{conlon} prove that there exists an equinumerous 4-coloring of $[4n]$ which is rainbow AP(4) free, when $n$ is even. Based on their construction, we show that such a coloring of $[4n]$...

متن کامل

Interval Arithmetic: Python Implementation and Applications

This paper presents the Python implementation of an interval system in the extended real set that is closed under arithmetic operations. This system consists of the lattice generated by union and intersection of closed intervals, with operations defined by image closure of their real set counterparts. The effects of floating-point rounding are accounted for in the implementation. Two applicatio...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:
  • Theor. Comput. Sci.

دوره 351  شماره 

صفحات  -

تاریخ انتشار 2006